.class public Lcom/jecelyin/editor/v2/view/EditorView;
.super Landroid/widget/RelativeLayout;
.source "EditorView.java"


# instance fields
.field private a:Lcom/jecelyin/editor/v2/widget/text/EditAreaView;

.field private b:Landroid/widget/ProgressBar;

.field private c:Z

.field private d:Lcom/jecelyin/editor/v2/common/a;


# direct methods
.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;)V
    .locals 1

    const/4 v0, 0x0

    .line 1
    invoke-direct {p0, p1, p2, v0}, Lcom/jecelyin/editor/v2/view/EditorView;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    return-void
.end method

.method public constructor <init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V
    .locals 0

    .line 2
    invoke-direct {p0, p1, p2, p3}, Landroid/widget/RelativeLayout;-><init>(Landroid/content/Context;Landroid/util/AttributeSet;I)V

    const/4 p1, 0x0

    .line 3
    iput-boolean p1, p0, Lcom/jecelyin/editor/v2/view/EditorView;->c:Z

    return-void
.end method


# virtual methods
.method public a()Z
    .locals 1

    .line 1
    iget-boolean v0, p0, Lcom/jecelyin/editor/v2/view/EditorView;->c:Z

    return v0
.end method

.method public b()V
    .locals 1

    const/4 v0, 0x1

    .line 1
    iput-boolean v0, p0, Lcom/jecelyin/editor/v2/view/EditorView;->c:Z

    return-void
.end method

.method public getEditAreaView()Lcom/jecelyin/editor/v2/widget/text/EditAreaView;
    .locals 1

    .line 1
    iget-object v0, p0, Lcom/jecelyin/editor/v2/view/EditorView;->a:Lcom/jecelyin/editor/v2/widget/text/EditAreaView;

    return-object v0
.end method

.method protected onDetachedFromWindow()V
    .locals 1

    .line 1
    invoke-super {p0}, Landroid/widget/RelativeLayout;->onDetachedFromWindow()V

    const/4 v0, 0x1

    .line 2
    iput-boolean v0, p0, Lcom/jecelyin/editor/v2/view/EditorView;->c:Z

    return-void
.end method

.method protected onFinishInflate()V
    .locals 1

    .line 1
    invoke-super {p0}, Landroid/widget/RelativeLayout;->onFinishInflate()V

    .line 2
    sget v0, Lcom/jecelyin/editor/v2/j;->edit_text:I

    invoke-virtual {p0, v0}, Landroid/widget/RelativeLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Lcom/jecelyin/editor/v2/widget/text/EditAreaView;

    iput-object v0, p0, Lcom/jecelyin/editor/v2/view/EditorView;->a:Lcom/jecelyin/editor/v2/widget/text/EditAreaView;

    .line 3
    sget v0, Lcom/jecelyin/editor/v2/j;->progress_view:I

    invoke-virtual {p0, v0}, Landroid/widget/RelativeLayout;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ProgressBar;

    iput-object v0, p0, Lcom/jecelyin/editor/v2/view/EditorView;->b:Landroid/widget/ProgressBar;

    return-void
.end method

.method public setLoading(Z)V
    .locals 2

    const/16 v0, 0x8

    const/4 v1, 0x0

    if-eqz p1, :cond_0

    .line 1
    iget-object p1, p0, Lcom/jecelyin/editor/v2/view/EditorView;->a:Lcom/jecelyin/editor/v2/widget/text/EditAreaView;

    invoke-virtual {p1, v0}, Landroid/webkit/WebView;->setVisibility(I)V

    .line 2
    iget-object p1, p0, Lcom/jecelyin/editor/v2/view/EditorView;->b:Landroid/widget/ProgressBar;

    invoke-virtual {p1, v1}, Landroid/widget/ProgressBar;->setVisibility(I)V

    goto :goto_0

    .line 3
    :cond_0
    iget-object p1, p0, Lcom/jecelyin/editor/v2/view/EditorView;->a:Lcom/jecelyin/editor/v2/widget/text/EditAreaView;

    invoke-virtual {p1, v1}, Landroid/webkit/WebView;->setVisibility(I)V

    .line 4
    iget-object p1, p0, Lcom/jecelyin/editor/v2/view/EditorView;->b:Landroid/widget/ProgressBar;

    invoke-virtual {p1, v0}, Landroid/widget/ProgressBar;->setVisibility(I)V

    :goto_0
    return-void
.end method

.method public setVisibility(I)V
    .locals 1

    .line 1
    invoke-super {p0, p1}, Landroid/widget/RelativeLayout;->setVisibility(I)V

    .line 2
    iget-object v0, p0, Lcom/jecelyin/editor/v2/view/EditorView;->d:Lcom/jecelyin/editor/v2/common/a;

    if-eqz v0, :cond_0

    .line 3
    invoke-interface {v0, p1}, Lcom/jecelyin/editor/v2/common/a;->a(I)V

    :cond_0
    return-void
.end method

.method public setVisibilityChangedListener(Lcom/jecelyin/editor/v2/common/a;)V
    .locals 0

    .line 1
    iput-object p1, p0, Lcom/jecelyin/editor/v2/view/EditorView;->d:Lcom/jecelyin/editor/v2/common/a;

    return-void
.end method
